//
//  PublishCommitTableViewCell.m
//  Findif
//
//  Created by Mac on 2018/12/4.
//  Copyright © 2018年 Cicel Chen. All rights reserved.
//

#import "PublishCommitTableViewCell.h"


@interface PublishCommitTableViewCell ()



@end

@implementation PublishCommitTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    if ([super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        [self setupUI];
    }
    
    return self;
}

//- (void)setModel:(PushCommitModel *)model{
//
//    model = _model;
//
//    self.titleLabel.text = model.merchants_comments_name;
//}

- (void)setupUI{
    
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    self.backgroundColor = ZRWhiteColor;
    
    UILabel * titleLabel = [UILabel new];
    
    titleLabel.textColor = ZRBlackColor;
    titleLabel.text = @"----";
    titleLabel.font = [UIFont systemFontOfSize:15 * SCREENH6];
    
    self.titleLabel = titleLabel;
    
    [self.contentView addSubview:self.titleLabel];
    
    
    XHStarRateView * starRateView = [[XHStarRateView alloc] initWithFrame:CGRectMake(205 * SCREENH6, 7 * SCREENH6, 130 * SCREENH6, 15 * SCREENH6)];
    starRateView.isAnimation = NO; // 有动画
    starRateView.rateStyle = XHStarRateViewRateStyeFullStar; //允许不完整星评论
    //    starRateView.delegate = self;
    starRateView.currentRating = 0;
    starRateView.normol = @"star(4)";
    starRateView.userInteractionEnabled = YES;
    
    self.startView = starRateView;
    
    [self.contentView addSubview:self.startView];
}

- (void)layoutSubviews{
    
    [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.mas_equalTo(self.contentView);
        make.leading.mas_equalTo(self.contentView).offset(15 * SCREENH6);
    }];
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
